Filter Service
I. Functionality
- Get, query data in
user-servicedatabase - Get, query data in
customer-servicedatabase - Get, query data in
third-party-servicedatabase - Get, query data in
record-servicedatabase - Authorize via a username and a password, exemplifying Basic Access Authentication
II. Packages
1. Dependencies
- Bluebird - Bluebird is a fully featured promise library with focus on innovative features and performance Bluebird
- Body-parser - Node.js body parsing middleware Body-parser
- Dataobject-parser - A nodejs module designed to parse an Object hash transposing between dot-notation and a structured heirarchy of Objects/Arrays Dataobject-parser
- Dotenv - Loads environment variables from a .env file into process.env Dotenv
- Express - Fast, unopinionated, minimalist web framework for node Express
- Lodash - A modern JavaScript utility library delivering modularity, performance & extras Lodash
- Mongodb - The official MongoDB driver for Node.js Mongodb
- Morgan - HTTP request logger middleware for node.js Morgan
- Nodemon - Simple monitor script for use during development of a node.js app Nodemon
2. Dev Dependencies
- Assert - The goal is to provide an API that is as functionally identical to the Node.js assert API as possible Assert
- Mocha - The fun, simple, flexible JavaScript test framework Mocha
- Chai - Assertion library for node: Chai
- Chai HTTP - HTTP Response assertions for the Chai Assertion Library: Chai HTTP
III. Source tree
.
├── app.js
├── config
│ ├── mongodb.js
│ └── service.js
├── controller
│ ├── customer-service
│ │ ├── activity.js
│ │ ├── agentGroup.js
│ │ ├── callLog.js
│ │ ├── contactField.js
│ │ ├── contactGroup.js
│ │ ├── contact.js
│ │ ├── groupField.js
│ │ └── template.js
│ ├── third-party-service
│ │ ├── endpoint.js
│ │ ├── fpt.js
│ │ ├── hubspot.js
│ │ ├── integrator.js
│ │ ├── mio.js
│ │ ├── nexmo.js
│ │ ├── nhanh.js
│ │ ├── sapo.js
│ │ ├── template.js
│ │ └── vietguy.js
│ ├── user-service
│ │ ├── agent.js
│ │ ├── role.js
│ │ └── sip_account.js
│ └── v1
│ ├── customer-service
│ │ ├── activity.js
│ │ ├── agentGroup.js
│ │ ├── callLog.js
│ │ ├── contactField.js
│ │ ├── contactGroup.js
│ │ ├── contact.js
│ │ ├── groupField.js
│ │ └── template.js
│ ├── record-service
│ │ ├── domain.js
│ │ └── pbx.js
│ ├── third-party-service
│ │ ├── endpoint.js
│ │ ├── fpt.js
│ │ ├── hubspot.js
│ │ ├── integrator.js
│ │ ├── mio.js
│ │ ├── nexmo.js
│ │ ├── nhanh.js
│ │ ├── sapo.js
│ │ ├── template.js
│ │ └── vietguy.js
│ └── user-service
│ ├── agent.js
│ ├── role.js
│ ├── sip_account.js
│ └── team.js
├── .env
├── lib
│ └── contact.js
├── middleware
│ └── auth.js
├── model
│ ├── accessService.js
│ ├── customerService.js
│ ├── recordService.js
│ ├── thirdPartyService.js
│ └── userService.js
├── package.json
├── package-lock.json
├── router
│ ├── customer-service
│ │ ├── activity.js
│ │ ├── agentGroup.js
│ │ ├── callLog.js
│ │ ├── contactField.js
│ │ ├── contactGroup.js
│ │ ├── contact.js
│ │ ├── groupField.js
│ │ ├── index.js
│ │ └── template.js
│ ├── third-party-service
│ │ ├── endpoint.js
│ │ ├── fpt.js
│ │ ├── hubspot.js
│ │ ├── index.js
│ │ ├── integrator.js
│ │ ├── mio.js
│ │ ├── nexmo.js
│ │ ├── nhanh.js
│ │ ├── sapo.js
│ │ ├── template.js
│ │ └── vietguy.js
│ ├── user-service
│ │ ├── agent.js
│ │ ├── index.js
│ │ ├── role.js
│ │ └── sip_account.js
│ └── v1
│ ├── customer-service
│ │ ├── activity.js
│ │ ├── agentGroup.js
│ │ ├── callLog.js
│ │ ├── contactField.js
│ │ ├── contactGroup.js
│ │ ├── contact.js
│ │ ├── groupField.js
│ │ ├── index.js
│ │ └── template.js
│ ├── index.js
│ ├── record-service
│ │ ├── domain.js
│ │ ├── index.js
│ │ └── pbx.js
│ ├── third-party-service
│ │ ├── endpoint.js
│ │ ├── fpt.js
│ │ ├── hubspot.js
│ │ ├── index.js
│ │ ├── integrator.js
│ │ ├── mio.js
│ │ ├── nexmo.js
│ │ ├── nhanh.js
│ │ ├── sapo.js
│ │ ├── template.js
│ │ └── vietguy.js
│ └── user-service
│ ├── agent.js
│ ├── index.js
│ ├── role.js
│ ├── sip_account.js
│ └── team.js
└── test
├── contactGroup.test.js
└── contact.test.js
IV. Installation
- Clone project:
git clone https://gitlab.com/gcalls-opensource/publics/gcallsback.git
- Change dir into filterService folder
cd filterService
- Install packages:
npm install
Start service:
run in development
npm run devrun in production
npm install -g pm2
npm start
Test:
npm run test
V. Endpoint
Please visit API documentation for more details